﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using JM.JCY.Proxy;

namespace JM.JCY.SharePointComponent.Department.ViewAllDepts
{
    public partial class ViewAllDeptsUserControl : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                using (UserManagementProxy proxy = new UserManagementProxy())
                {
                    var deptDT = proxy.GetAllDepartment();
                    this.gvAllDept.DataSource = deptDT;
                    this.gvAllDept.DataBind();
                }

            }
        }
    }
}
